@charset "utf-8";
/*-------------------------
    list-menu组件的样式
	字体大小默认12px.使用百分比计算字体比例，body的字体大小是16px。
	在html中只要在标签中引用下面两个类
	.oc-dropDownList-left或者
	.oc-dropDownList-right 并按照要求的格式写相对应的代码即可获得对应的下拉菜单
	
---------------------------*/
$menuHeight: 1rem;
$menuBlank:0.3rem;//菜单的间距
$menuBackground: #F5F7F7;
$menuLiColor:rgba(255,255,255,0.8);
$menuLifrontColor:rgb(240, 236, 255);
$listColor: #EFF0EF;
$listItemBorder: #D7D7D7;
$listBorderColor: #979797;

$itemHeight: 1.1rem;
$itemIconWidth: 1.5rem;
$itemHoverBorderColor: #78AEE5;
$itemHoverBackgroundColor: rgba($itemHoverBorderColor, 0.15);

$positiveBuffer: 3rem;
$reverseBuffer: 1rem;
$bufferColor: rgba(0,0,0, 0.2);
$bufferColor: transparent;
//水平排列的菜单
menu.oc-menu {
	//background-color: $menuBackground;
	font-size: 0.6rem;
	font-family: "Microsoft Yahei";
	list-style: none;
	//height: $menuHeight;
	//width: 100%;
	box-shadow: 0px -1px 1px -1px #999 inset;
	li {
		position: relative;
	}
	// Menu的按钮
	> li{
		cursor: default;
		float: left;
		display: block;
		height: $menuHeight;
		line-height: $menuHeight - 0.1rem;
		border: none;
		padding:0 $menuBlank;
		&:hover,
		&.active {
			box-shadow:0px 0px 0px 1px rgba(61, 149, 197, 0.75) inset;
			background-color: $menuLifrontColor;
		}
		&.active > ul {
			display: block;
		}

		// 所有菜单
		ul {
			display: none;
			position: absolute;
			border: 1px solid $listBorderColor;
			top:0;
			left: 100%;
			padding: 2px;
			background: $listColor;
			box-shadow: 4px 4px 2px -2px #878787;
			li {
				list-style: none;
				padding: 1px $itemIconWidth;
				box-sizing: border-box;
				position: relative;
				//line-height: 1rem;
				height: $itemHeight;
				min-width: 4em;
				cursor: default;
				border:  1px solid transparent;

				// Item Buffer When hover
				&:hover:after{
					content: "";
					display: block;
					position: absolute;
					left: 0;
					height: 0.4rem;
					top:100%;
					width: 100%;
//					background: #ccc;
					z-index: 2;
				}
				&.sub:before {
					content: "";
					position: absolute;
					display: block;
					width: 0;
					height: 0;
					border: 0.2rem solid;
					border-color: transparent transparent transparent #000;
					top: 0.3rem;
					right: 0.2rem;
				}

				// Item was wraped by button
				button {
					font: inherit;
					text-align: left;
					border: none;
					background: transparent;
				}
				button::-moz-focus-inner {
					padding:0;
					border:0
				}
				> ul{
					margin-top: -2px;
					margin-left: -2px;
				}
			}
			li:hover {
				border-color: $itemHoverBorderColor;
				background: $itemHoverBackgroundColor;
				position: relative;
				z-index: 1;
			}

			// Multi menu core.
			li:hover > ul {
				display: block;
			}
		}
		// 菜单缓冲区
		ul:before {
			content: "";
			background: $bufferColor;
			position: absolute;
			height: 100%;
			width:100%;
			padding: 0 $positiveBuffer $positiveBuffer $reverseBuffer;
			margin: -3px 0 0 (-$reverseBuffer);
		}
		// 菜单图标与标题的分界线
		ul:after {
			content: "";
			border-left: 1px solid $listItemBorder;
			position: absolute;
			left: $itemIconWidth - 0.05rem;
			top: 2px;
			bottom: 2px;
		}
		> ul {
			top: $menuHeight;
			left: 0;
		}
	}
	hr{
		position: relative;
		z-index: -1;
		height:1px;
		border-width:0;
		background-color: rgb(215, 215, 215);
		margin-left: 1.4rem;
		margin-top: 0.1rem;
		margin-bottom: 0.1rem;
	}
	&:after{
		content: "";
		display: block;
		clear: both;
//					background: #ccc;
		z-index: 2;
	}
}
//水平排列菜单下的下拉列表，分靠左开和靠右边开，默认靠右
.oc-menu {
	position: relative;
	white-space: nowrap;
	ul{
		z-index: 10;
	}
	.main {
		font-weight: normal;
		right: -0.3rem;
		top: 100%;
		margin-top: -0.5rem;
	}
}
.oc-dropDownList-right{
	ul{
		.sub:before {
			content: "\25E3";
			position: absolute;
	  		left: 0.4rem;
		}
	}
}
/*----------靠左边向右开-------------*/
.oc-dropDownList-left{
	ul{
		//display: block;
		padding-left: 2.5rem;
		margin-left: -2.5rem;
		left: 100%;
		.sub:before {
			content: "\25E2";
			position: absolute;
			right: 0.4rem;
		}	
	}
	.main{
		left:-0.3rem;
	}
}
@keyframes fadeIn {
	from {
		opacity: 0.3;
	}
	to {
		opacity: 1;
	}
}
.sub:hover > ul,
.oc-dropDownList-left:hover > ul,.oc-dropDownList-right:hover > ul {
	display: block;
	animation: fadeIn 0.3s;
}
